package com.wanlian.netty.File.msg;


import com.wanlian.util.QueueUtil;

import java.util.List;

public class FilePeerMsgQueue {
    private static QueueUtil<FilePeerMsg> filePeerMsgs = new QueueUtil<FilePeerMsg>();

    public static synchronized void add(FilePeerMsg msg) {
        filePeerMsgs.add(msg);
    }

    public static synchronized FilePeerMsg get() {
        return filePeerMsgs.get();
    }

    public static synchronized List<FilePeerMsg> get(int count) {
        return filePeerMsgs.get(count);
    }

    public static synchronized long size() {
        return filePeerMsgs.size();
    }

}
